package org.galahad.colcontrol.client.panel;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import org.galahad.colcontrol.client.menu.MainMenuController;

/**
 *
 * @author Fred Boussada
 */
public class MainPanelController {

    private DockLayoutPanel mainPanel = null;
    private HorizontalPanel upperPanel = null;

    private MainMenuController menuCtrlr = null;

    public MainPanelController() {
        initMainPanel();
    }

    private void initMainPanel() {
        mainPanel = new DockLayoutPanel(Unit.PX);

        initUpperPanel();

        mainPanel.addNorth(upperPanel, 450);
    }

    private void initUpperPanel() {
        upperPanel = new HorizontalPanel();

        upperPanel.add(new Label("Título"));
        upperPanel.add(new Label("- complemento"));
        upperPanel.setSpacing(10);

        menuCtrlr = new MainMenuController();
        upperPanel.add(menuCtrlr.getMenu());
    }

    public DockLayoutPanel getMainPanel() {
        return mainPanel;
    }

}
